package indigo.loader 
{
	import indigo.loader.events.LoadEvent;
	/**
	 * Returns content from the AssetManager
	 * @param	String that indentifies the content
	 * 
	 */
	public function loadMultiple( filenames:Array, eventHandler:Function, totalBytes:int = 0 ):void
	{
		if ( filenames.length > 0 )
		{
			var myManager:ContentManager = ContentManager.getInstance( );
			myManager.addEventListener( LoadEvent.INIT, eventHandler, false, 0, true );
			myManager.addEventListener( LoadEvent.STOP, eventHandler, false, 0, true );	
			myManager.addEventListener( LoadEvent.ERROR, eventHandler, false, 0, true );
			myManager.addEventListener( LoadEvent.PROGRESS, eventHandler, false, 0, true );
			myManager.addEventListener( LoadEvent.COMPLETE, eventHandler, false, 0, true );
			myManager.addEventListener( LoadEvent.BULK_COMPLETE, eventHandler, false, 0, true );
				
			myManager.addMultiple.apply( myManager, filenames );
			myManager.load( totalBytes );
		}
	}
}
